package server;

import java.io.IOException;

public class DemoServlet2 extends HttpServlet{
	
	@Override
    public void doGet(Request request, Response response) {
        String content = "<h1>DemoServlet2</h1>";
        try {
            response.output((HttpProtocolUtil.getHttpHeader200(content.getBytes().length) + content));
        } catch (IOException e) {
            e.printStackTrace();
        }
    }

    @Override
    public void doPost(Request request, Response response) {
        String content = "<h1>DemoServlet2</h1>";
        try {
            response.output((HttpProtocolUtil.getHttpHeader200(content.getBytes().length) + content));
        } catch (IOException e) {
            e.printStackTrace();
        }
    }

	@Override
	public void init() throws Exception {
		// TODO Auto-generated method stub
		
	}

	@Override
	public void destory() throws Exception {
		// TODO Auto-generated method stub
		
	}

}
